package com.calabar.phm.etl.driver.spark.exception;

/**
 * @Author zmc <mingcheng.zhang@cdcalabar.com>
 * @Date 17-6-7 上午10:49
 * @Version v1.0
 * @Des 自定义算子异常
 */
public class OperatorParamsValidateException extends Exception {
    private String operatorUnique;

    /**
     * @param message 异常描述
     */
    public OperatorParamsValidateException(String operatorUnique, String message) {
        super(message);
        this.operatorUnique = operatorUnique;
    }

    public OperatorParamsValidateException(String operatorUnique, Throwable cause) {
        super(cause);
        this.operatorUnique = operatorUnique;
    }

    /**
     * @param message 异常描述
     * @param cause   抛出的异常
     */
    public OperatorParamsValidateException(String operatorUnique, String message, Throwable cause) {
        super(message, cause);
        this.operatorUnique = operatorUnique;
    }

    public int getCode() {
        return ExceptionCodeEnum.OPERATOR_PARAMS_VALIDATE_EXCEPTION.get_code();
    }

    public String getOperatorUnique() {
        return operatorUnique;
    }
}
